import 'package:flutter/material.dart';
import '../shower.dart';

class FourScreenVertial extends StatefulWidget {
  final String materialPath;
  final List blocks;
  FourScreenVertial({Key key, this.materialPath, this.blocks});
  @override
  _FourScreenVertialState createState() => new _FourScreenVertialState();
}

class _FourScreenVertialState extends State<FourScreenVertial> {
  @override
  Widget build(BuildContext context) {
    return Flex(
      direction: Axis.vertical,
      children: <Widget>[
        Expanded(
          flex: 1,
          child: Flex(
            direction: Axis.horizontal,
            crossAxisAlignment: CrossAxisAlignment.center,
            children: [
              Expanded(
                flex: 1,
                child:Shower(dirPath: '${widget.materialPath}/0', showList: widget.blocks[0]['files']),
              )
            ]
          ),
        ),
        Expanded(
          flex: 1,
          child: Flex(
            direction: Axis.horizontal,
            crossAxisAlignment: CrossAxisAlignment.center,
            children: [
              Expanded(
                flex: 1,
                child:Shower(dirPath: '${widget.materialPath}/1', showList: widget.blocks[1]['files']),
              )
            ]
          ),
        ),
        Expanded(
          flex: 1,
          child: Flex(
            direction: Axis.horizontal,
            crossAxisAlignment: CrossAxisAlignment.center,
            children: [
              Expanded(
                flex: 1,
                child:Shower(dirPath: '${widget.materialPath}/2', showList: widget.blocks[2]['files']),
              )
            ]
          ),
        ),
        Expanded(
          flex: 1,
          child: Flex(
            direction: Axis.horizontal,
            crossAxisAlignment: CrossAxisAlignment.center,
            children: [
              Expanded(
                flex: 1,
                child:Shower(dirPath: '${widget.materialPath}/2', showList: widget.blocks[2]['files']),
              )
            ]
          ),
        ),
      ],
    );
  }
}